package conson.tech.manage.api.coupons.form;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import conson.tech.manage.api.coupons.dto.CouponAppliedDetailDTO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * Description: 优惠券核销请求
 * Author: guoxt
 * Date: 2020/7/27 11:02
 */
@Data
public class CouponApplyForm {

    /**
     * 优惠券券码（多个）
     */
    @ApiModelProperty(value = "优惠券信息")
    @NotNull(message = "优惠券核销信息不能为空")
    private List<CouponAppliedDetailDTO> couponAppliedDetailDTOS;
    /**
     * 用户id
     */
    @ApiModelProperty(value = "用户id（非必填）")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long userId;
}
